//
//  Extension+UILabel.swift
//  XLWB
//
//  Created by key on 16/6/27.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit

extension UILabel {
    
    convenience init(textFont: CGFloat, textColor: UIColor, maxLabelW: CGFloat = 0) {
        
        self.init()
        
        self.font = UIFont.systemFontOfSize(textFont)

        self.textColor = textColor
        
        if maxLabelW > 0 {
        
            self.preferredMaxLayoutWidth = maxLabelW  //设置label的 最大布局宽度
            
            self.numberOfLines = 0
            
        }
        
    }
    
    
    
}
